<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>QCNSim: Node Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">QCNSim
   </div>
   <div id="projectbrief">Simulator for Quake-Catcher Network</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="class_node-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Node Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="class_node.html" title="Node class. ">Node</a> class.  
 <a href="class_node.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_node_8h_source.html">Node.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Node:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_node.png" usemap="#Node_map" alt=""/>
  <map id="Node_map" name="Node_map">
<area href="class_entity.html" title="Entity class. " alt="Entity" shape="rect" coords="0,0,230,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa433297c5f2e8f74c5a999e429eada60"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#aa433297c5f2e8f74c5a999e429eada60">Node</a> (<a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;<a class="el" href="class_node.html#a14540911910efef23e01ec6ad881b843">simulatorGlobals</a>)</td></tr>
<tr class="memdesc:aa433297c5f2e8f74c5a999e429eada60"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#aa433297c5f2e8f74c5a999e429eada60">More...</a><br/></td></tr>
<tr class="separator:aa433297c5f2e8f74c5a999e429eada60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a3aa1e2c2fff5cc94cb0abc36f07d31"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a9a3aa1e2c2fff5cc94cb0abc36f07d31">getReceivedBytesCount</a> () const </td></tr>
<tr class="memdesc:a9a3aa1e2c2fff5cc94cb0abc36f07d31"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get received bytes count.  <a href="#a9a3aa1e2c2fff5cc94cb0abc36f07d31">More...</a><br/></td></tr>
<tr class="separator:a9a3aa1e2c2fff5cc94cb0abc36f07d31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b1e673f06404a5197429a352c2154b2"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a4b1e673f06404a5197429a352c2154b2">getReceivedPdusOrTokensCount</a> () const </td></tr>
<tr class="memdesc:a4b1e673f06404a5197429a352c2154b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get received PDUs count.  <a href="#a4b1e673f06404a5197429a352c2154b2">More...</a><br/></td></tr>
<tr class="separator:a4b1e673f06404a5197429a352c2154b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56b7b2497ac364efe0719ea219d98b9e"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a56b7b2497ac364efe0719ea219d98b9e">getForwardedPdusOrTokensCount</a> () const </td></tr>
<tr class="memdesc:a56b7b2497ac364efe0719ea219d98b9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get forwarded PDUs count.  <a href="#a56b7b2497ac364efe0719ea219d98b9e">More...</a><br/></td></tr>
<tr class="separator:a56b7b2497ac364efe0719ea219d98b9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3dada83d831807c17f41b76395759c6e"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a3dada83d831807c17f41b76395759c6e">getForwardedBytesCount</a> () const </td></tr>
<tr class="memdesc:a3dada83d831807c17f41b76395759c6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get forwarded PDUs count.  <a href="#a3dada83d831807c17f41b76395759c6e">More...</a><br/></td></tr>
<tr class="separator:a3dada83d831807c17f41b76395759c6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31099ef50497ea806ea588c879ef22e1"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a31099ef50497ea806ea588c879ef22e1">getDroppedPdusOrTokensCount</a> () const </td></tr>
<tr class="memdesc:a31099ef50497ea806ea588c879ef22e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get dropped PDUs count.  <a href="#a31099ef50497ea806ea588c879ef22e1">More...</a><br/></td></tr>
<tr class="separator:a31099ef50497ea806ea588c879ef22e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20dfdbde07dfa9499ba12c66407ef696"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a20dfdbde07dfa9499ba12c66407ef696">getLastPduOrTokenDelay</a> () const </td></tr>
<tr class="memdesc:a20dfdbde07dfa9499ba12c66407ef696"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get last PDU measured delay.  <a href="#a20dfdbde07dfa9499ba12c66407ef696">More...</a><br/></td></tr>
<tr class="separator:a20dfdbde07dfa9499ba12c66407ef696"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f36f9c793310fa1342479d3ee99afcf"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a6f36f9c793310fa1342479d3ee99afcf">getSumPduOrTokenDelay</a> () const </td></tr>
<tr class="memdesc:a6f36f9c793310fa1342479d3ee99afcf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get Sum of all measured PDU delays.  <a href="#a6f36f9c793310fa1342479d3ee99afcf">More...</a><br/></td></tr>
<tr class="separator:a6f36f9c793310fa1342479d3ee99afcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea1a8c07cd8b785dcd2d872392b9e630"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#aea1a8c07cd8b785dcd2d872392b9e630">getMeanPduOrTokenDelay</a> () const </td></tr>
<tr class="memdesc:aea1a8c07cd8b785dcd2d872392b9e630"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get mean of all measured PDU delays.  <a href="#aea1a8c07cd8b785dcd2d872392b9e630">More...</a><br/></td></tr>
<tr class="separator:aea1a8c07cd8b785dcd2d872392b9e630"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f388ac2e7209056fbc0988419b1d667"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a3f388ac2e7209056fbc0988419b1d667">getLastPduOrTokenJitter</a> () const </td></tr>
<tr class="memdesc:a3f388ac2e7209056fbc0988419b1d667"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get jitter (difference between delays) as measured between last two PDUs.  <a href="#a3f388ac2e7209056fbc0988419b1d667">More...</a><br/></td></tr>
<tr class="separator:a3f388ac2e7209056fbc0988419b1d667"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95ef71aa24da2ed22f1da017d27602ac"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a95ef71aa24da2ed22f1da017d27602ac">getSumPduOrTokenJitter</a> () const </td></tr>
<tr class="memdesc:a95ef71aa24da2ed22f1da017d27602ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get sum of all measured jitters (difference between delays).  <a href="#a95ef71aa24da2ed22f1da017d27602ac">More...</a><br/></td></tr>
<tr class="separator:a95ef71aa24da2ed22f1da017d27602ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe5523d6e76ecfec5bd09ca388ee5873"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#abe5523d6e76ecfec5bd09ca388ee5873">getMeanPduOrTokenJitter</a> () const </td></tr>
<tr class="memdesc:abe5523d6e76ecfec5bd09ca388ee5873"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get Mean of all measured jitters (difference between delays).  <a href="#abe5523d6e76ecfec5bd09ca388ee5873">More...</a><br/></td></tr>
<tr class="separator:abe5523d6e76ecfec5bd09ca388ee5873"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2cb2a58f1d3477a30e863e59b1dbc3e2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1">NodeReturnType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a2cb2a58f1d3477a30e863e59b1dbc3e2">processAndForward</a> (std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt; token)</td></tr>
<tr class="memdesc:a2cb2a58f1d3477a30e863e59b1dbc3e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process the token by updating statistics and other procedures. Then, "forward" the token by changing its previous/next hops according to the attached route.  <a href="#a2cb2a58f1d3477a30e863e59b1dbc3e2">More...</a><br/></td></tr>
<tr class="separator:a2cb2a58f1d3477a30e863e59b1dbc3e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8b8197c396ed400575990c2d8609c28"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1">NodeReturnType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#ad8b8197c396ed400575990c2d8609c28">processAndForward</a> (std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; pdu)</td></tr>
<tr class="memdesc:ad8b8197c396ed400575990c2d8609c28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process the PDU by updating statistics and other procedures. Then, "forward" the PDU by changing its previous/next hops according to the attached route.  <a href="#ad8b8197c396ed400575990c2d8609c28">More...</a><br/></td></tr>
<tr class="separator:ad8b8197c396ed400575990c2d8609c28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_entity"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_entity')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_entity.html">Entity</a></td></tr>
<tr class="memitem:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entity.html#ac2da1e8a32161accc56f39ac52cebd86">~Entity</a> ()=0</td></tr>
<tr class="memdesc:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make this abstract (pure virtual), cannot be instantiated.  <a href="#ac2da1e8a32161accc56f39ac52cebd86">More...</a><br/></td></tr>
<tr class="separator:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:ac5b0a78b84737a4bf4adffbcbc0755ab"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#ac5b0a78b84737a4bf4adffbcbc0755ab">updateArrivalStatistics</a> (std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt; token)</td></tr>
<tr class="memdesc:ac5b0a78b84737a4bf4adffbcbc0755ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update <a class="el" href="class_node.html" title="Node class. ">Node</a> statistics upon arrival of token.  <a href="#ac5b0a78b84737a4bf4adffbcbc0755ab">More...</a><br/></td></tr>
<tr class="separator:ac5b0a78b84737a4bf4adffbcbc0755ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7467aafc77bd9d430ca329e931ade5a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#af7467aafc77bd9d430ca329e931ade5a">updateForwardingStatistics</a> (std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt; token)</td></tr>
<tr class="memdesc:af7467aafc77bd9d430ca329e931ade5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update <a class="el" href="class_node.html" title="Node class. ">Node</a> statistics upon forwarding of token.  <a href="#af7467aafc77bd9d430ca329e931ade5a">More...</a><br/></td></tr>
<tr class="separator:af7467aafc77bd9d430ca329e931ade5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa01346a4872affb1aa40cc5e83c1a134"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#aa01346a4872affb1aa40cc5e83c1a134">updateArrivalStatistics</a> (std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; pdu)</td></tr>
<tr class="memdesc:aa01346a4872affb1aa40cc5e83c1a134"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update <a class="el" href="class_node.html" title="Node class. ">Node</a> statistics upon arrival of PDU.  <a href="#aa01346a4872affb1aa40cc5e83c1a134">More...</a><br/></td></tr>
<tr class="separator:aa01346a4872affb1aa40cc5e83c1a134"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2adf03fc3b1465b929d29eb36f574c75"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a2adf03fc3b1465b929d29eb36f574c75">updateForwardingStatistics</a> (std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; pdu)</td></tr>
<tr class="memdesc:a2adf03fc3b1465b929d29eb36f574c75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update <a class="el" href="class_node.html" title="Node class. ">Node</a> statistics upon forwarding of PDU.  <a href="#a2adf03fc3b1465b929d29eb36f574c75">More...</a><br/></td></tr>
<tr class="separator:a2adf03fc3b1465b929d29eb36f574c75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9f5e321e4dfb45e444e007607867737"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1">NodeReturnType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#ae9f5e321e4dfb45e444e007607867737">updateForwardHops</a> (std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt; token)</td></tr>
<tr class="memdesc:ae9f5e321e4dfb45e444e007607867737"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update token's or PDU's hop fields to prepare it for forwarding, according to explicit route attached to token.  <a href="#ae9f5e321e4dfb45e444e007607867737">More...</a><br/></td></tr>
<tr class="separator:ae9f5e321e4dfb45e444e007607867737"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:af48f6ec6fd6ea43523f139c5d5ff3cdd"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#af48f6ec6fd6ea43523f139c5d5ff3cdd">receivedBytesCount</a></td></tr>
<tr class="memdesc:af48f6ec6fd6ea43523f139c5d5ff3cdd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Count of received bytes by this node.  <a href="#af48f6ec6fd6ea43523f139c5d5ff3cdd">More...</a><br/></td></tr>
<tr class="separator:af48f6ec6fd6ea43523f139c5d5ff3cdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15b31ec3be471e9e046f48517e2963aa"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">receivedPdusOrTokensCount</a></td></tr>
<tr class="memdesc:a15b31ec3be471e9e046f48517e2963aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Count of received PDUs by this node (packets for network PDUs, for example).  <a href="#a15b31ec3be471e9e046f48517e2963aa">More...</a><br/></td></tr>
<tr class="separator:a15b31ec3be471e9e046f48517e2963aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fb081dd5928c91756f9faf672dafb35"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a0fb081dd5928c91756f9faf672dafb35">forwardedPdusOrTokensCount</a></td></tr>
<tr class="memdesc:a0fb081dd5928c91756f9faf672dafb35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Count of forwarded PDUs from this node to next <a class="el" href="class_entity.html" title="Entity class. ">Entity</a>.  <a href="#a0fb081dd5928c91756f9faf672dafb35">More...</a><br/></td></tr>
<tr class="separator:a0fb081dd5928c91756f9faf672dafb35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3423410395300339105d6148290148cc"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a3423410395300339105d6148290148cc">forwardedBytesCount</a></td></tr>
<tr class="memdesc:a3423410395300339105d6148290148cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Count of forwarded bytes from this node to next <a class="el" href="class_entity.html" title="Entity class. ">Entity</a>.  <a href="#a3423410395300339105d6148290148cc">More...</a><br/></td></tr>
<tr class="separator:a3423410395300339105d6148290148cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a54b09eb2ba1cc137ab23a4766c4960"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a6a54b09eb2ba1cc137ab23a4766c4960">droppedPdusOrTokensCount</a></td></tr>
<tr class="memdesc:a6a54b09eb2ba1cc137ab23a4766c4960"><td class="mdescLeft">&#160;</td><td class="mdescRight">Count of dropped PDUs by this node.  <a href="#a6a54b09eb2ba1cc137ab23a4766c4960">More...</a><br/></td></tr>
<tr class="separator:a6a54b09eb2ba1cc137ab23a4766c4960"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35475c10b6c54bc85c2ce15fb5ea042d"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">lastDelay</a></td></tr>
<tr class="memdesc:a35475c10b6c54bc85c2ce15fb5ea042d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delay measured for last PDU received by this node.  <a href="#a35475c10b6c54bc85c2ce15fb5ea042d">More...</a><br/></td></tr>
<tr class="separator:a35475c10b6c54bc85c2ce15fb5ea042d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a579cc4fb0789a1de48fb56ae99d7385a"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a579cc4fb0789a1de48fb56ae99d7385a">sumDelay</a></td></tr>
<tr class="memdesc:a579cc4fb0789a1de48fb56ae99d7385a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sum of delays measured for all PDUs received by this node.  <a href="#a579cc4fb0789a1de48fb56ae99d7385a">More...</a><br/></td></tr>
<tr class="separator:a579cc4fb0789a1de48fb56ae99d7385a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae133a5c3fc82ca150ff95a0ac0a5da86"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#ae133a5c3fc82ca150ff95a0ac0a5da86">meanDelay</a></td></tr>
<tr class="memdesc:ae133a5c3fc82ca150ff95a0ac0a5da86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mean delay as measured for all PDUs received by this node.  <a href="#ae133a5c3fc82ca150ff95a0ac0a5da86">More...</a><br/></td></tr>
<tr class="separator:ae133a5c3fc82ca150ff95a0ac0a5da86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec183b66f5f92e8cae4f3a1269e1316c"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#aec183b66f5f92e8cae4f3a1269e1316c">lastJitter</a></td></tr>
<tr class="memdesc:aec183b66f5f92e8cae4f3a1269e1316c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Jitter measured between the last two PDUs received by this node.  <a href="#aec183b66f5f92e8cae4f3a1269e1316c">More...</a><br/></td></tr>
<tr class="separator:aec183b66f5f92e8cae4f3a1269e1316c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a5f15b9aed15145bbe65b61a30cdc67"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a4a5f15b9aed15145bbe65b61a30cdc67">sumJitter</a></td></tr>
<tr class="memdesc:a4a5f15b9aed15145bbe65b61a30cdc67"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sum of jitters measured for all PDUs received by this node.  <a href="#a4a5f15b9aed15145bbe65b61a30cdc67">More...</a><br/></td></tr>
<tr class="separator:a4a5f15b9aed15145bbe65b61a30cdc67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35637af5cd80cfe72376d43f16b64f19"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a35637af5cd80cfe72376d43f16b64f19">meanJitter</a></td></tr>
<tr class="memdesc:a35637af5cd80cfe72376d43f16b64f19"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mean jitter as measured for all PDUs received by this node.  <a href="#a35637af5cd80cfe72376d43f16b64f19">More...</a><br/></td></tr>
<tr class="separator:a35637af5cd80cfe72376d43f16b64f19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e1c05e3d8fbb3e4348418a60e512591"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a9e1c05e3d8fbb3e4348418a60e512591">previousDelay</a></td></tr>
<tr class="memdesc:a9e1c05e3d8fbb3e4348418a60e512591"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delay measured for previous PDU (the PDU before the current received one) received by this node. Necessary for jitter calculation.  <a href="#a9e1c05e3d8fbb3e4348418a60e512591">More...</a><br/></td></tr>
<tr class="separator:a9e1c05e3d8fbb3e4348418a60e512591"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14540911910efef23e01ec6ad881b843"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_node.html#a14540911910efef23e01ec6ad881b843">simulatorGlobals</a></td></tr>
<tr class="memdesc:a14540911910efef23e01ec6ad881b843"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object, to get clock time.  <a href="#a14540911910efef23e01ec6ad881b843">More...</a><br/></td></tr>
<tr class="separator:a14540911910efef23e01ec6ad881b843"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="class_node.html" title="Node class. ">Node</a> class. </p>
<dl class="section author"><dt>Author</dt><dd>Marcos Portnoi </dd></dl>
<dl class="section date"><dt>Date</dt><dd>August 2013</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2013 University of Delaware. </dd>
<dd>
QCNSim uses elements of TARVOS simulator, Copyright (C) 2005, 2006, 2007 Marcos Portnoi. </dd></dl>
<dl class="section user"><dt></dt><dd>This file is part of QCNSim. QCNSim is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>
 QCNSim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.<br/>
 You should have received a copy of the GNU Lesser General Public License along with QCNSim. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </dd></dl>
<dl class="section user"><dt>Description</dt><dd>The <a class="el" href="class_node.html" title="Node class. ">Node</a> class describes several statistics for counting PDUs and bytes received, for instance, and to measure jitter and delay for PDUs. Typically, a node measures statistics for network layer (network PDU, therefore). Entities can be "attached" to nodes: these entities are typically traffic generators (sources), links, and application servers.</dd></dl>
<dl class="section user"><dt>Functionalities</dt><dd>This simulator works by abstracting a computer network into traffic generators, nodes, links, and possibly sinks and application servers. A traffic generator is attached to a node, which servers as the source of the PDU/token. The generated PDU/token will have a destination node, and this node will typically be the sink for the PDU. An application server may be connected to a node. This application server <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> may receive the contents of the PDU/token and process it, generating some result or more PDUs/tokens. A node with a sink simply means that node is the end destination of the PDU/token, and the PDU/token will be dropped upon receival, after proper statistics updated. Links will be attached to nodes, and each link connects two nodes. There can be many links attached to a single node. The node will perform PDU/token forwarding based on some routing rule. Forwarding consists of consulting a routing table or rule upon receival of a PDU/token, if that node is not the final destination of the PDU/token. The routing table or rule will define the next link (attached to the current node) through which the PDU/token will be forwarded. Note that this "next link" is similar to the "next hop" information on typical routing tables. "Next link," "attached application server," "traffic generators" are all <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> objects. </dd></dl>

<p>Definition at line <a class="el" href="_node_8h_source.html#l00051">51</a> of file <a class="el" href="_node_8h_source.html">Node.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa433297c5f2e8f74c5a999e429eada60"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Node::Node </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;&#160;</td>
          <td class="paramname"><em>simulatorGlobals</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor. </p>
<dl class="section author"><dt>Author</dt><dd>Marcos Portnoi </dd></dl>
<dl class="section date"><dt>Date</dt><dd>August 2013</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2013 University of Delaware. </dd>
<dd>
QCNSim uses elements of TARVOS simulator, Copyright (C) 2005, 2006, 2007 Marcos Portnoi. </dd></dl>
<dl class="section user"><dt></dt><dd>This file is part of QCNSim. QCNSim is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>
 QCNSim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.<br/>
 You should have received a copy of the GNU Lesser General Public License along with QCNSim. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</dd></dl>
<p>Sets all member variables (statistics) to zero.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">simulatorGlobals</td><td><a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00030">30</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;                                            : <a class="code" href="class_node.html#af48f6ec6fd6ea43523f139c5d5ff3cdd">receivedBytesCount</a>(0), <a class="code" href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">receivedPdusOrTokensCount</a>(0), <a class="code" href="class_node.html#a0fb081dd5928c91756f9faf672dafb35">forwardedPdusOrTokensCount</a>(0), <a class="code" href="class_node.html#a3423410395300339105d6148290148cc">forwardedBytesCount</a>(0), <a class="code" href="class_node.html#a6a54b09eb2ba1cc137ab23a4766c4960">droppedPdusOrTokensCount</a>(0),</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;        <a class="code" href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">lastDelay</a>(0.0), <a class="code" href="class_node.html#a579cc4fb0789a1de48fb56ae99d7385a">sumDelay</a>(0.0), <a class="code" href="class_node.html#ae133a5c3fc82ca150ff95a0ac0a5da86">meanDelay</a>(0.0), <a class="code" href="class_node.html#aec183b66f5f92e8cae4f3a1269e1316c">lastJitter</a>(0.0), <a class="code" href="class_node.html#a4a5f15b9aed15145bbe65b61a30cdc67">sumJitter</a>(0.0), <a class="code" href="class_node.html#a35637af5cd80cfe72376d43f16b64f19">meanJitter</a>(0.0), <a class="code" href="class_node.html#a9e1c05e3d8fbb3e4348418a60e512591">previousDelay</a>(0.0), <a class="code" href="class_node.html#a14540911910efef23e01ec6ad881b843">simulatorGlobals</a>(simulatorGlobals) {</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;}</div>
<div class="ttc" id="class_node_html_ae133a5c3fc82ca150ff95a0ac0a5da86"><div class="ttname"><a href="class_node.html#ae133a5c3fc82ca150ff95a0ac0a5da86">Node::meanDelay</a></div><div class="ttdeci">double meanDelay</div><div class="ttdoc">Mean delay as measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00060">Node.h:60</a></div></div>
<div class="ttc" id="class_node_html_a9e1c05e3d8fbb3e4348418a60e512591"><div class="ttname"><a href="class_node.html#a9e1c05e3d8fbb3e4348418a60e512591">Node::previousDelay</a></div><div class="ttdeci">double previousDelay</div><div class="ttdoc">Delay measured for previous PDU (the PDU before the current received one) received by this node...</div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00064">Node.h:64</a></div></div>
<div class="ttc" id="class_node_html_a35637af5cd80cfe72376d43f16b64f19"><div class="ttname"><a href="class_node.html#a35637af5cd80cfe72376d43f16b64f19">Node::meanJitter</a></div><div class="ttdeci">double meanJitter</div><div class="ttdoc">Mean jitter as measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00063">Node.h:63</a></div></div>
<div class="ttc" id="class_node_html_af48f6ec6fd6ea43523f139c5d5ff3cdd"><div class="ttname"><a href="class_node.html#af48f6ec6fd6ea43523f139c5d5ff3cdd">Node::receivedBytesCount</a></div><div class="ttdeci">unsigned int receivedBytesCount</div><div class="ttdoc">Count of received bytes by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00053">Node.h:53</a></div></div>
<div class="ttc" id="class_node_html_a15b31ec3be471e9e046f48517e2963aa"><div class="ttname"><a href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">Node::receivedPdusOrTokensCount</a></div><div class="ttdeci">unsigned int receivedPdusOrTokensCount</div><div class="ttdoc">Count of received PDUs by this node (packets for network PDUs, for example). </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00054">Node.h:54</a></div></div>
<div class="ttc" id="class_node_html_a6a54b09eb2ba1cc137ab23a4766c4960"><div class="ttname"><a href="class_node.html#a6a54b09eb2ba1cc137ab23a4766c4960">Node::droppedPdusOrTokensCount</a></div><div class="ttdeci">unsigned int droppedPdusOrTokensCount</div><div class="ttdoc">Count of dropped PDUs by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00057">Node.h:57</a></div></div>
<div class="ttc" id="class_node_html_a3423410395300339105d6148290148cc"><div class="ttname"><a href="class_node.html#a3423410395300339105d6148290148cc">Node::forwardedBytesCount</a></div><div class="ttdeci">unsigned int forwardedBytesCount</div><div class="ttdoc">Count of forwarded bytes from this node to next Entity. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00056">Node.h:56</a></div></div>
<div class="ttc" id="class_node_html_aec183b66f5f92e8cae4f3a1269e1316c"><div class="ttname"><a href="class_node.html#aec183b66f5f92e8cae4f3a1269e1316c">Node::lastJitter</a></div><div class="ttdeci">double lastJitter</div><div class="ttdoc">Jitter measured between the last two PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00061">Node.h:61</a></div></div>
<div class="ttc" id="class_node_html_a4a5f15b9aed15145bbe65b61a30cdc67"><div class="ttname"><a href="class_node.html#a4a5f15b9aed15145bbe65b61a30cdc67">Node::sumJitter</a></div><div class="ttdeci">double sumJitter</div><div class="ttdoc">Sum of jitters measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00062">Node.h:62</a></div></div>
<div class="ttc" id="class_node_html_a0fb081dd5928c91756f9faf672dafb35"><div class="ttname"><a href="class_node.html#a0fb081dd5928c91756f9faf672dafb35">Node::forwardedPdusOrTokensCount</a></div><div class="ttdeci">unsigned int forwardedPdusOrTokensCount</div><div class="ttdoc">Count of forwarded PDUs from this node to next Entity. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00055">Node.h:55</a></div></div>
<div class="ttc" id="class_node_html_a579cc4fb0789a1de48fb56ae99d7385a"><div class="ttname"><a href="class_node.html#a579cc4fb0789a1de48fb56ae99d7385a">Node::sumDelay</a></div><div class="ttdeci">double sumDelay</div><div class="ttdoc">Sum of delays measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00059">Node.h:59</a></div></div>
<div class="ttc" id="class_node_html_a14540911910efef23e01ec6ad881b843"><div class="ttname"><a href="class_node.html#a14540911910efef23e01ec6ad881b843">Node::simulatorGlobals</a></div><div class="ttdeci">SimulatorGlobals &amp; simulatorGlobals</div><div class="ttdoc">Reference to SimulatorGlobals object, to get clock time. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00065">Node.h:65</a></div></div>
<div class="ttc" id="class_node_html_a35475c10b6c54bc85c2ce15fb5ea042d"><div class="ttname"><a href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">Node::lastDelay</a></div><div class="ttdeci">double lastDelay</div><div class="ttdoc">Delay measured for last PDU received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00058">Node.h:58</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a31099ef50497ea806ea588c879ef22e1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Node::getDroppedPdusOrTokensCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get dropped PDUs count. </p>
<dl class="section return"><dt>Returns</dt><dd>Dropped PDUs count. </dd></dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00078">78</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                                                     {</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_node.html#a6a54b09eb2ba1cc137ab23a4766c4960">droppedPdusOrTokensCount</a>;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;}</div>
<div class="ttc" id="class_node_html_a6a54b09eb2ba1cc137ab23a4766c4960"><div class="ttname"><a href="class_node.html#a6a54b09eb2ba1cc137ab23a4766c4960">Node::droppedPdusOrTokensCount</a></div><div class="ttdeci">unsigned int droppedPdusOrTokensCount</div><div class="ttdoc">Count of dropped PDUs by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00057">Node.h:57</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3dada83d831807c17f41b76395759c6e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Node::getForwardedBytesCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get forwarded PDUs count. </p>
<dl class="section return"><dt>Returns</dt><dd>Forwarded PDUs count. </dd></dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00069">69</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;                                                {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_node.html#a3423410395300339105d6148290148cc">forwardedBytesCount</a>;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;}</div>
<div class="ttc" id="class_node_html_a3423410395300339105d6148290148cc"><div class="ttname"><a href="class_node.html#a3423410395300339105d6148290148cc">Node::forwardedBytesCount</a></div><div class="ttdeci">unsigned int forwardedBytesCount</div><div class="ttdoc">Count of forwarded bytes from this node to next Entity. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00056">Node.h:56</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a56b7b2497ac364efe0719ea219d98b9e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Node::getForwardedPdusOrTokensCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get forwarded PDUs count. </p>
<dl class="section return"><dt>Returns</dt><dd>Forwarded PDUs count. </dd></dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00060">60</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;                                                       {</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_node.html#a0fb081dd5928c91756f9faf672dafb35">forwardedPdusOrTokensCount</a>;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;}</div>
<div class="ttc" id="class_node_html_a0fb081dd5928c91756f9faf672dafb35"><div class="ttname"><a href="class_node.html#a0fb081dd5928c91756f9faf672dafb35">Node::forwardedPdusOrTokensCount</a></div><div class="ttdeci">unsigned int forwardedPdusOrTokensCount</div><div class="ttdoc">Count of forwarded PDUs from this node to next Entity. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00055">Node.h:55</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a20dfdbde07dfa9499ba12c66407ef696"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double Node::getLastPduOrTokenDelay </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get last PDU measured delay. </p>
<dl class="section return"><dt>Returns</dt><dd>Last PDU measured delay. </dd></dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00087">87</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                                          {</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">lastDelay</a>;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;}</div>
<div class="ttc" id="class_node_html_a35475c10b6c54bc85c2ce15fb5ea042d"><div class="ttname"><a href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">Node::lastDelay</a></div><div class="ttdeci">double lastDelay</div><div class="ttdoc">Delay measured for last PDU received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00058">Node.h:58</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3f388ac2e7209056fbc0988419b1d667"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double Node::getLastPduOrTokenJitter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get jitter (difference between delays) as measured between last two PDUs. </p>
<dl class="section return"><dt>Returns</dt><dd>Jitter. </dd></dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00114">114</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                                           {</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_node.html#aec183b66f5f92e8cae4f3a1269e1316c">lastJitter</a>;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;}</div>
<div class="ttc" id="class_node_html_aec183b66f5f92e8cae4f3a1269e1316c"><div class="ttname"><a href="class_node.html#aec183b66f5f92e8cae4f3a1269e1316c">Node::lastJitter</a></div><div class="ttdeci">double lastJitter</div><div class="ttdoc">Jitter measured between the last two PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00061">Node.h:61</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aea1a8c07cd8b785dcd2d872392b9e630"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double Node::getMeanPduOrTokenDelay </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get mean of all measured PDU delays. </p>
<dl class="section return"><dt>Returns</dt><dd>Mean of all measured PDU delays. </dd></dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00105">105</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;                                          {</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_node.html#ae133a5c3fc82ca150ff95a0ac0a5da86">meanDelay</a>;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;}</div>
<div class="ttc" id="class_node_html_ae133a5c3fc82ca150ff95a0ac0a5da86"><div class="ttname"><a href="class_node.html#ae133a5c3fc82ca150ff95a0ac0a5da86">Node::meanDelay</a></div><div class="ttdeci">double meanDelay</div><div class="ttdoc">Mean delay as measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00060">Node.h:60</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="abe5523d6e76ecfec5bd09ca388ee5873"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double Node::getMeanPduOrTokenJitter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get Mean of all measured jitters (difference between delays). </p>
<dl class="section return"><dt>Returns</dt><dd>Mean of all measured jitters (difference between delays). </dd></dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00132">132</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;                                           {</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_node.html#a35637af5cd80cfe72376d43f16b64f19">meanJitter</a>;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;}</div>
<div class="ttc" id="class_node_html_a35637af5cd80cfe72376d43f16b64f19"><div class="ttname"><a href="class_node.html#a35637af5cd80cfe72376d43f16b64f19">Node::meanJitter</a></div><div class="ttdeci">double meanJitter</div><div class="ttdoc">Mean jitter as measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00063">Node.h:63</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9a3aa1e2c2fff5cc94cb0abc36f07d31"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Node::getReceivedBytesCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get received bytes count. </p>
<p>The size, in bytes, of a PDU depends on the protocol layer; it is, therefore, simulation/implementation dependent.</p>
<dl class="section return"><dt>Returns</dt><dd>Received bytes count. </dd></dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00042">42</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;                                               {</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_node.html#af48f6ec6fd6ea43523f139c5d5ff3cdd">receivedBytesCount</a>;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;}</div>
<div class="ttc" id="class_node_html_af48f6ec6fd6ea43523f139c5d5ff3cdd"><div class="ttname"><a href="class_node.html#af48f6ec6fd6ea43523f139c5d5ff3cdd">Node::receivedBytesCount</a></div><div class="ttdeci">unsigned int receivedBytesCount</div><div class="ttdoc">Count of received bytes by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00053">Node.h:53</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a4b1e673f06404a5197429a352c2154b2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Node::getReceivedPdusOrTokensCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get received PDUs count. </p>
<dl class="section return"><dt>Returns</dt><dd>Received PDUs count. </dd></dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00051">51</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;                                                      {</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">receivedPdusOrTokensCount</a>;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;}</div>
<div class="ttc" id="class_node_html_a15b31ec3be471e9e046f48517e2963aa"><div class="ttname"><a href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">Node::receivedPdusOrTokensCount</a></div><div class="ttdeci">unsigned int receivedPdusOrTokensCount</div><div class="ttdoc">Count of received PDUs by this node (packets for network PDUs, for example). </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00054">Node.h:54</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a6f36f9c793310fa1342479d3ee99afcf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double Node::getSumPduOrTokenDelay </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get Sum of all measured PDU delays. </p>
<dl class="section return"><dt>Returns</dt><dd>Sum of all measured PDU delays. </dd></dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00096">96</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;                                         {</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_node.html#a579cc4fb0789a1de48fb56ae99d7385a">sumDelay</a>;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;}</div>
<div class="ttc" id="class_node_html_a579cc4fb0789a1de48fb56ae99d7385a"><div class="ttname"><a href="class_node.html#a579cc4fb0789a1de48fb56ae99d7385a">Node::sumDelay</a></div><div class="ttdeci">double sumDelay</div><div class="ttdoc">Sum of delays measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00059">Node.h:59</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a95ef71aa24da2ed22f1da017d27602ac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double Node::getSumPduOrTokenJitter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get sum of all measured jitters (difference between delays). </p>
<dl class="section return"><dt>Returns</dt><dd>Sum of all measured jitters (difference between delays). </dd></dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00123">123</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;                                          {</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_node.html#a4a5f15b9aed15145bbe65b61a30cdc67">sumJitter</a>;</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;}</div>
<div class="ttc" id="class_node_html_a4a5f15b9aed15145bbe65b61a30cdc67"><div class="ttname"><a href="class_node.html#a4a5f15b9aed15145bbe65b61a30cdc67">Node::sumJitter</a></div><div class="ttdeci">double sumJitter</div><div class="ttdoc">Sum of jitters measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00062">Node.h:62</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a2cb2a58f1d3477a30e863e59b1dbc3e2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1">NodeReturnType</a> Node::processAndForward </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt;&#160;</td>
          <td class="paramname"><em>token</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process the token by updating statistics and other procedures. Then, "forward" the token by changing its previous/next hops according to the attached route. </p>
<p>Here, the token is received by the node. Statistics are updated, and other maintenance procedures are taken. The token is "forwarded" according to the attached route by changing previous/next pointers in the token. Also, it is checked whether this node is the destination node, in which case the token is discarded. <a class="el" href="class_route.html" title="Route class. ">Route</a> is also recorded here (if the corresponding flag within the <a class="el" href="class_token.html" title="Token class. ">Token</a> object is set).</p>
<p>This <a class="el" href="class_node.html" title="Node class. ">Node</a> assumes it is the current node within which the token is. If it is not the current node, further outcomes are undefined.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">token</td><td><a class="el" href="class_token.html" title="Token class. ">Token</a> currently at this node, i.e., token just arrived at the node. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00149">149</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;                                                                 {</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <span class="comment">// No check for TTL needed in Token, just for PDUs.</span></div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="comment">// Is this the destination node AND the first time the token arrives here? If true, update stats and do nothing else.</span></div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="keywordflow">if</span> (token-&gt;destination.get() == <span class="keyword">this</span> &amp;&amp; token-&gt;previous.get() != <span class="keyword">this</span>) { <span class="comment">// Need to compare addresses here! Or maybe a comparator? Nah.</span></div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <span class="comment">// Call the record route function; the hop will only be effectively recorded if the recordRoute is set within the Route object.</span></div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="comment">// Calling this function without prior checking of the flag is therefore safe.</span></div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        token-&gt;addHopToRecordedRoute(shared_from_this()); <span class="comment">// need smart pointer of self reference here!</span></div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <a class="code" href="class_node.html#ac5b0a78b84737a4bf4adffbcbc0755ab">updateArrivalStatistics</a>(token);</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        <span class="comment">// Update token previous field to this node. Leave other fields untouched.</span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        token-&gt;previous = shared_from_this();</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1ab9804cb278b1f322f56a216720a67eec">NodeReturnType::FINAL_DESTINATION</a>;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (token-&gt;destination.get() == <span class="keyword">this</span> &amp;&amp; token-&gt;previous.get() == <span class="keyword">this</span>) {</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        <span class="comment">// If this node is the destination and token has been here (received) just before, do nothing.</span></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1ab9804cb278b1f322f56a216720a67eec">NodeReturnType::FINAL_DESTINATION</a>;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        <span class="comment">// This is not the destination node. Forward the token to the next hop by modifying the appropriate token fields.</span></div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        <span class="comment">// Do not deal with TTL here; leave it for PDU types.</span></div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        token-&gt;addHopToRecordedRoute(shared_from_this()); <span class="comment">// need smart pointer of self reference here!</span></div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        <span class="comment">// Sanity check; if the return type is not PDU_ROUTE_UPDATED, there is some inconsistency in the route table or unpredicted bug.</span></div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_node.html#ae9f5e321e4dfb45e444e007607867737">updateForwardHops</a>(token) != <a class="code" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1a6491ac1bf9f296c0bd614d1b182f8932">NodeReturnType::PDU_ROUTE_UPDATED</a>) {</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;            std::cout &lt;&lt; <span class="stringliteral">&quot;Node::processAndForward(token): Inconsistency in routing path. Aborting...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;            exit(1);</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        }</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;        <a class="code" href="class_node.html#ac5b0a78b84737a4bf4adffbcbc0755ab">updateArrivalStatistics</a>(token);</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        <a class="code" href="class_node.html#af7467aafc77bd9d430ca329e931ade5a">updateForwardingStatistics</a>(token);</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1a6491ac1bf9f296c0bd614d1b182f8932">NodeReturnType::PDU_ROUTE_UPDATED</a>;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    }</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;}</div>
<div class="ttc" id="_node_return_type_8h_html_a653f4b3757de7a3613c60211493c60c1a6491ac1bf9f296c0bd614d1b182f8932"><div class="ttname"><a href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1a6491ac1bf9f296c0bd614d1b182f8932">NodeReturnType::PDU_ROUTE_UPDATED</a></div><div class="ttdoc">Node is not final destination; route information was updated within PDU/token, to be forwarded...</div></div>
<div class="ttc" id="_node_return_type_8h_html_a653f4b3757de7a3613c60211493c60c1ab9804cb278b1f322f56a216720a67eec"><div class="ttname"><a href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1ab9804cb278b1f322f56a216720a67eec">NodeReturnType::FINAL_DESTINATION</a></div><div class="ttdoc">This node is the final destination. Stats updated, nothing else to do in node. </div></div>
<div class="ttc" id="class_node_html_ac5b0a78b84737a4bf4adffbcbc0755ab"><div class="ttname"><a href="class_node.html#ac5b0a78b84737a4bf4adffbcbc0755ab">Node::updateArrivalStatistics</a></div><div class="ttdeci">void updateArrivalStatistics(std::shared_ptr&lt; Token &gt; token)</div><div class="ttdoc">Update Node statistics upon arrival of token. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8cpp_source.html#l00236">Node.cpp:236</a></div></div>
<div class="ttc" id="class_node_html_af7467aafc77bd9d430ca329e931ade5a"><div class="ttname"><a href="class_node.html#af7467aafc77bd9d430ca329e931ade5a">Node::updateForwardingStatistics</a></div><div class="ttdeci">void updateForwardingStatistics(std::shared_ptr&lt; Token &gt; token)</div><div class="ttdoc">Update Node statistics upon forwarding of token. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8cpp_source.html#l00258">Node.cpp:258</a></div></div>
<div class="ttc" id="class_node_html_ae9f5e321e4dfb45e444e007607867737"><div class="ttname"><a href="class_node.html#ae9f5e321e4dfb45e444e007607867737">Node::updateForwardHops</a></div><div class="ttdeci">NodeReturnType updateForwardHops(std::shared_ptr&lt; Token &gt; token)</div><div class="ttdoc">Update token&amp;#39;s or PDU&amp;#39;s hop fields to prepare it for forwarding, according to explicit route attached...</div><div class="ttdef"><b>Definition:</b> <a href="_node_8cpp_source.html#l00311">Node.cpp:311</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad8b8197c396ed400575990c2d8609c28"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1">NodeReturnType</a> Node::processAndForward </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td>
          <td class="paramname"><em>pdu</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process the PDU by updating statistics and other procedures. Then, "forward" the PDU by changing its previous/next hops according to the attached route. </p>
<p>Here, the PDU is received by the node. Statistics are updated, and other maintenance procedures are taken. The PDU is "forwarded" according to the attached route by changing previous/next pointers in the PDU. Also, it is checked whether this node is the destination node, in which case the PDU is discarded. <a class="el" href="class_route.html" title="Route class. ">Route</a> is also recorded here (if the corresponding flag within the <a class="el" href="class_token.html" title="Token class. ">Token</a> object is set).</p>
<p>This <a class="el" href="class_node.html" title="Node class. ">Node</a> assumes it is the current node within which the PDU is. If it is not the current node, further outcomes are undefined.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pdu</td><td>PDU currently at this node, i.e., PDU just arrived at the node. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00192">192</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;                                                                          {</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <span class="comment">// Check for TTL; if it is zero (or less), discard PDU, record this hop to route (only if it was not recorded before), do nothing else.</span></div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="keywordflow">if</span> (pdu-&gt;getTtl() &lt;= 0) {</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        <span class="keywordflow">if</span> (pdu-&gt;getRecordedRoute().back().get() != <span class="keyword">this</span>) {</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;            <span class="comment">// Only record the hop if it is not already there (case in which the explicit route has this hop more than once in a sequence).</span></div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;            pdu-&gt;addHopToRecordedRoute(shared_from_this());</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        }</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        ++<a class="code" href="class_node.html#a6a54b09eb2ba1cc137ab23a4766c4960">droppedPdusOrTokensCount</a>;</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1a6a9d501110e3a79a73c88afceef39905">NodeReturnType::TTL_EXCEEDED_PDU_DISCARDED</a>;</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    }</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    <span class="comment">// Is this the destination node AND the first time the pdu arrives here? If true, update stats and do nothing else.</span></div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    <span class="keywordflow">if</span> (pdu-&gt;destination.get() == <span class="keyword">this</span> &amp;&amp; pdu-&gt;previous.get() != <span class="keyword">this</span>) { <span class="comment">// Need to compare addresses here! Or maybe a comparator? Nah.</span></div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        <span class="comment">// Call the record route function; the hop will only be effectively recorded if the recordRoute is set within the Route object.</span></div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        <span class="comment">// Calling this function without prior checking of the flag is therefore safe.</span></div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;        pdu-&gt;addHopToRecordedRoute(shared_from_this()); <span class="comment">// need smart pointer of self reference here!</span></div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;        <a class="code" href="class_node.html#ac5b0a78b84737a4bf4adffbcbc0755ab">updateArrivalStatistics</a>(pdu);</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        <span class="comment">// Update pdu previous field to this node. Leave other fields untouched.</span></div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;        pdu-&gt;previous = shared_from_this();</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1ab9804cb278b1f322f56a216720a67eec">NodeReturnType::FINAL_DESTINATION</a>;</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pdu-&gt;destination.get() == <span class="keyword">this</span> &amp;&amp; pdu-&gt;previous.get() == <span class="keyword">this</span>) {</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;        <span class="comment">// If this node is the destination and pdu has been here (received) just before, do nothing.</span></div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1ab9804cb278b1f322f56a216720a67eec">NodeReturnType::FINAL_DESTINATION</a>;</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    } <span class="keywordflow">else</span> { <span class="comment">// Forward.</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;        <span class="comment">// This is not the destination node. Forward the pdu to the next hop by modifying the appropriate pdu fields.</span></div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        <span class="comment">// Do not deal with TTL here; leave it for PDU types.</span></div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        pdu-&gt;addHopToRecordedRoute(shared_from_this()); <span class="comment">// need smart pointer of self reference here!</span></div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        <span class="comment">// Sanity check; if the return type is not PDU_ROUTE_UPDATED, there is some inconsistency in the route table or unpredicted bug.</span></div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_node.html#ae9f5e321e4dfb45e444e007607867737">updateForwardHops</a>(pdu) != <a class="code" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1a6491ac1bf9f296c0bd614d1b182f8932">NodeReturnType::PDU_ROUTE_UPDATED</a>) {</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;            std::cout &lt;&lt; <span class="stringliteral">&quot;Node::processAndForward(PDU): Inconsistency in routing path. Aborting...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;            exit(1);</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        }</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;        pdu-&gt;decrementTtl(); <span class="comment">// Decrement the TTL in egress.</span></div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;        <a class="code" href="class_node.html#ac5b0a78b84737a4bf4adffbcbc0755ab">updateArrivalStatistics</a>(pdu);</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;        <a class="code" href="class_node.html#af7467aafc77bd9d430ca329e931ade5a">updateForwardingStatistics</a>(pdu);</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1a6491ac1bf9f296c0bd614d1b182f8932">NodeReturnType::PDU_ROUTE_UPDATED</a>;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    }</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;}</div>
<div class="ttc" id="_node_return_type_8h_html_a653f4b3757de7a3613c60211493c60c1a6491ac1bf9f296c0bd614d1b182f8932"><div class="ttname"><a href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1a6491ac1bf9f296c0bd614d1b182f8932">NodeReturnType::PDU_ROUTE_UPDATED</a></div><div class="ttdoc">Node is not final destination; route information was updated within PDU/token, to be forwarded...</div></div>
<div class="ttc" id="class_node_html_a6a54b09eb2ba1cc137ab23a4766c4960"><div class="ttname"><a href="class_node.html#a6a54b09eb2ba1cc137ab23a4766c4960">Node::droppedPdusOrTokensCount</a></div><div class="ttdeci">unsigned int droppedPdusOrTokensCount</div><div class="ttdoc">Count of dropped PDUs by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00057">Node.h:57</a></div></div>
<div class="ttc" id="_node_return_type_8h_html_a653f4b3757de7a3613c60211493c60c1ab9804cb278b1f322f56a216720a67eec"><div class="ttname"><a href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1ab9804cb278b1f322f56a216720a67eec">NodeReturnType::FINAL_DESTINATION</a></div><div class="ttdoc">This node is the final destination. Stats updated, nothing else to do in node. </div></div>
<div class="ttc" id="class_node_html_ac5b0a78b84737a4bf4adffbcbc0755ab"><div class="ttname"><a href="class_node.html#ac5b0a78b84737a4bf4adffbcbc0755ab">Node::updateArrivalStatistics</a></div><div class="ttdeci">void updateArrivalStatistics(std::shared_ptr&lt; Token &gt; token)</div><div class="ttdoc">Update Node statistics upon arrival of token. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8cpp_source.html#l00236">Node.cpp:236</a></div></div>
<div class="ttc" id="class_node_html_af7467aafc77bd9d430ca329e931ade5a"><div class="ttname"><a href="class_node.html#af7467aafc77bd9d430ca329e931ade5a">Node::updateForwardingStatistics</a></div><div class="ttdeci">void updateForwardingStatistics(std::shared_ptr&lt; Token &gt; token)</div><div class="ttdoc">Update Node statistics upon forwarding of token. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8cpp_source.html#l00258">Node.cpp:258</a></div></div>
<div class="ttc" id="class_node_html_ae9f5e321e4dfb45e444e007607867737"><div class="ttname"><a href="class_node.html#ae9f5e321e4dfb45e444e007607867737">Node::updateForwardHops</a></div><div class="ttdeci">NodeReturnType updateForwardHops(std::shared_ptr&lt; Token &gt; token)</div><div class="ttdoc">Update token&amp;#39;s or PDU&amp;#39;s hop fields to prepare it for forwarding, according to explicit route attached...</div><div class="ttdef"><b>Definition:</b> <a href="_node_8cpp_source.html#l00311">Node.cpp:311</a></div></div>
<div class="ttc" id="_node_return_type_8h_html_a653f4b3757de7a3613c60211493c60c1a6a9d501110e3a79a73c88afceef39905"><div class="ttname"><a href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1a6a9d501110e3a79a73c88afceef39905">NodeReturnType::TTL_EXCEEDED_PDU_DISCARDED</a></div><div class="ttdoc">TTL for this PDU has exceeded. Nothing done. </div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac5b0a78b84737a4bf4adffbcbc0755ab"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Node::updateArrivalStatistics </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt;&#160;</td>
          <td class="paramname"><em>token</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Update <a class="el" href="class_node.html" title="Node class. ">Node</a> statistics upon arrival of token. </p>
<p>These statistics should only be updated if the token was not discarded due to TTL exceeded, for example. </p>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00236">236</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;                                                             {</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    <span class="comment">// Should tokens generated from a generator attached to this node still be included in the statistics?</span></div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    <a class="code" href="class_node.html#a9e1c05e3d8fbb3e4348418a60e512591">previousDelay</a> = <a class="code" href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">lastDelay</a>; <span class="comment">// Save last measured delay to allow jitter calculations for the next token received here.</span></div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    ++<a class="code" href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">receivedPdusOrTokensCount</a>;</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    <span class="comment">//receivedBytesCount +=</span></div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    <a class="code" href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">lastDelay</a> = <a class="code" href="class_node.html#a14540911910efef23e01ec6ad881b843">simulatorGlobals</a>.<a class="code" href="class_simulator_globals.html#a08da82e86d7c26d8f2498bd313f0e66e">getCurrentAbsoluteTime</a>() - token-&gt;getAbsoluteGenerationTime();</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    <a class="code" href="class_node.html#a579cc4fb0789a1de48fb56ae99d7385a">sumDelay</a> += <a class="code" href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">lastDelay</a>;</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    <a class="code" href="class_node.html#ae133a5c3fc82ca150ff95a0ac0a5da86">meanDelay</a> = <a class="code" href="class_node.html#a579cc4fb0789a1de48fb56ae99d7385a">sumDelay</a> / <a class="code" href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">receivedPdusOrTokensCount</a>;</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;    <span class="comment">// Perform jitter calculations only if there is more than one token received here.</span></div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">receivedPdusOrTokensCount</a> &gt; 1) {</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        <a class="code" href="class_node.html#aec183b66f5f92e8cae4f3a1269e1316c">lastJitter</a> = <a class="code" href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">lastDelay</a> - <a class="code" href="class_node.html#a9e1c05e3d8fbb3e4348418a60e512591">previousDelay</a>;</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        <a class="code" href="class_node.html#a4a5f15b9aed15145bbe65b61a30cdc67">sumJitter</a> += <a class="code" href="class_node.html#aec183b66f5f92e8cae4f3a1269e1316c">lastJitter</a>;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        <a class="code" href="class_node.html#a35637af5cd80cfe72376d43f16b64f19">meanJitter</a> = <a class="code" href="class_node.html#a4a5f15b9aed15145bbe65b61a30cdc67">sumJitter</a> / (<a class="code" href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">receivedPdusOrTokensCount</a> - 1); <span class="comment">// Number of measured jitters is equal to count of tokens - 1.</span></div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    }</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;}</div>
<div class="ttc" id="class_node_html_ae133a5c3fc82ca150ff95a0ac0a5da86"><div class="ttname"><a href="class_node.html#ae133a5c3fc82ca150ff95a0ac0a5da86">Node::meanDelay</a></div><div class="ttdeci">double meanDelay</div><div class="ttdoc">Mean delay as measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00060">Node.h:60</a></div></div>
<div class="ttc" id="class_node_html_a9e1c05e3d8fbb3e4348418a60e512591"><div class="ttname"><a href="class_node.html#a9e1c05e3d8fbb3e4348418a60e512591">Node::previousDelay</a></div><div class="ttdeci">double previousDelay</div><div class="ttdoc">Delay measured for previous PDU (the PDU before the current received one) received by this node...</div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00064">Node.h:64</a></div></div>
<div class="ttc" id="class_node_html_a35637af5cd80cfe72376d43f16b64f19"><div class="ttname"><a href="class_node.html#a35637af5cd80cfe72376d43f16b64f19">Node::meanJitter</a></div><div class="ttdeci">double meanJitter</div><div class="ttdoc">Mean jitter as measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00063">Node.h:63</a></div></div>
<div class="ttc" id="class_node_html_a15b31ec3be471e9e046f48517e2963aa"><div class="ttname"><a href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">Node::receivedPdusOrTokensCount</a></div><div class="ttdeci">unsigned int receivedPdusOrTokensCount</div><div class="ttdoc">Count of received PDUs by this node (packets for network PDUs, for example). </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00054">Node.h:54</a></div></div>
<div class="ttc" id="class_simulator_globals_html_a08da82e86d7c26d8f2498bd313f0e66e"><div class="ttname"><a href="class_simulator_globals.html#a08da82e86d7c26d8f2498bd313f0e66e">SimulatorGlobals::getCurrentAbsoluteTime</a></div><div class="ttdeci">double getCurrentAbsoluteTime() const </div><div class="ttdef"><b>Definition:</b> <a href="_simulator_globals_8cpp_source.html#l00070">SimulatorGlobals.cpp:70</a></div></div>
<div class="ttc" id="class_node_html_aec183b66f5f92e8cae4f3a1269e1316c"><div class="ttname"><a href="class_node.html#aec183b66f5f92e8cae4f3a1269e1316c">Node::lastJitter</a></div><div class="ttdeci">double lastJitter</div><div class="ttdoc">Jitter measured between the last two PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00061">Node.h:61</a></div></div>
<div class="ttc" id="class_node_html_a4a5f15b9aed15145bbe65b61a30cdc67"><div class="ttname"><a href="class_node.html#a4a5f15b9aed15145bbe65b61a30cdc67">Node::sumJitter</a></div><div class="ttdeci">double sumJitter</div><div class="ttdoc">Sum of jitters measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00062">Node.h:62</a></div></div>
<div class="ttc" id="class_node_html_a579cc4fb0789a1de48fb56ae99d7385a"><div class="ttname"><a href="class_node.html#a579cc4fb0789a1de48fb56ae99d7385a">Node::sumDelay</a></div><div class="ttdeci">double sumDelay</div><div class="ttdoc">Sum of delays measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00059">Node.h:59</a></div></div>
<div class="ttc" id="class_node_html_a14540911910efef23e01ec6ad881b843"><div class="ttname"><a href="class_node.html#a14540911910efef23e01ec6ad881b843">Node::simulatorGlobals</a></div><div class="ttdeci">SimulatorGlobals &amp; simulatorGlobals</div><div class="ttdoc">Reference to SimulatorGlobals object, to get clock time. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00065">Node.h:65</a></div></div>
<div class="ttc" id="class_node_html_a35475c10b6c54bc85c2ce15fb5ea042d"><div class="ttname"><a href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">Node::lastDelay</a></div><div class="ttdeci">double lastDelay</div><div class="ttdoc">Delay measured for last PDU received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00058">Node.h:58</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aa01346a4872affb1aa40cc5e83c1a134"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Node::updateArrivalStatistics </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td>
          <td class="paramname"><em>pdu</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Update <a class="el" href="class_node.html" title="Node class. ">Node</a> statistics upon arrival of PDU. </p>
<p>These statistics should only be updated if the PDU was not discarded due to TTL exceeded, for example. </p>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00268">268</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;                                                                      {</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    <span class="comment">// Should PDUs generated from a generator attached to this node still be included in the statistics?</span></div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;    <a class="code" href="class_node.html#a9e1c05e3d8fbb3e4348418a60e512591">previousDelay</a> = <a class="code" href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">lastDelay</a>; <span class="comment">// Save last measured delay to allow jitter calculations for the next PDU received here.</span></div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;    ++<a class="code" href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">receivedPdusOrTokensCount</a>;</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    <a class="code" href="class_node.html#af48f6ec6fd6ea43523f139c5d5ff3cdd">receivedBytesCount</a> += pdu-&gt;getPduSize();</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    <a class="code" href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">lastDelay</a> = <a class="code" href="class_node.html#a14540911910efef23e01ec6ad881b843">simulatorGlobals</a>.<a class="code" href="class_simulator_globals.html#a08da82e86d7c26d8f2498bd313f0e66e">getCurrentAbsoluteTime</a>() - pdu-&gt;getAbsoluteGenerationTime();</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    <a class="code" href="class_node.html#a579cc4fb0789a1de48fb56ae99d7385a">sumDelay</a> += <a class="code" href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">lastDelay</a>;</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;    <a class="code" href="class_node.html#ae133a5c3fc82ca150ff95a0ac0a5da86">meanDelay</a> = <a class="code" href="class_node.html#a579cc4fb0789a1de48fb56ae99d7385a">sumDelay</a> / <a class="code" href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">receivedPdusOrTokensCount</a>;</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;    <span class="comment">// Perform jitter calculations only if there is more than one PDU received here.</span></div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">receivedPdusOrTokensCount</a> &gt; 1) {</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;        <a class="code" href="class_node.html#aec183b66f5f92e8cae4f3a1269e1316c">lastJitter</a> = <a class="code" href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">lastDelay</a> - <a class="code" href="class_node.html#a9e1c05e3d8fbb3e4348418a60e512591">previousDelay</a>;</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;        <a class="code" href="class_node.html#a4a5f15b9aed15145bbe65b61a30cdc67">sumJitter</a> += <a class="code" href="class_node.html#aec183b66f5f92e8cae4f3a1269e1316c">lastJitter</a>;</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;        <a class="code" href="class_node.html#a35637af5cd80cfe72376d43f16b64f19">meanJitter</a> = <a class="code" href="class_node.html#a4a5f15b9aed15145bbe65b61a30cdc67">sumJitter</a> / (<a class="code" href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">receivedPdusOrTokensCount</a> - 1); <span class="comment">// Number of measured jitters is equal to count of PDUs - 1.</span></div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    }</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;}</div>
<div class="ttc" id="class_node_html_ae133a5c3fc82ca150ff95a0ac0a5da86"><div class="ttname"><a href="class_node.html#ae133a5c3fc82ca150ff95a0ac0a5da86">Node::meanDelay</a></div><div class="ttdeci">double meanDelay</div><div class="ttdoc">Mean delay as measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00060">Node.h:60</a></div></div>
<div class="ttc" id="class_node_html_a9e1c05e3d8fbb3e4348418a60e512591"><div class="ttname"><a href="class_node.html#a9e1c05e3d8fbb3e4348418a60e512591">Node::previousDelay</a></div><div class="ttdeci">double previousDelay</div><div class="ttdoc">Delay measured for previous PDU (the PDU before the current received one) received by this node...</div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00064">Node.h:64</a></div></div>
<div class="ttc" id="class_node_html_a35637af5cd80cfe72376d43f16b64f19"><div class="ttname"><a href="class_node.html#a35637af5cd80cfe72376d43f16b64f19">Node::meanJitter</a></div><div class="ttdeci">double meanJitter</div><div class="ttdoc">Mean jitter as measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00063">Node.h:63</a></div></div>
<div class="ttc" id="class_node_html_af48f6ec6fd6ea43523f139c5d5ff3cdd"><div class="ttname"><a href="class_node.html#af48f6ec6fd6ea43523f139c5d5ff3cdd">Node::receivedBytesCount</a></div><div class="ttdeci">unsigned int receivedBytesCount</div><div class="ttdoc">Count of received bytes by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00053">Node.h:53</a></div></div>
<div class="ttc" id="class_node_html_a15b31ec3be471e9e046f48517e2963aa"><div class="ttname"><a href="class_node.html#a15b31ec3be471e9e046f48517e2963aa">Node::receivedPdusOrTokensCount</a></div><div class="ttdeci">unsigned int receivedPdusOrTokensCount</div><div class="ttdoc">Count of received PDUs by this node (packets for network PDUs, for example). </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00054">Node.h:54</a></div></div>
<div class="ttc" id="class_simulator_globals_html_a08da82e86d7c26d8f2498bd313f0e66e"><div class="ttname"><a href="class_simulator_globals.html#a08da82e86d7c26d8f2498bd313f0e66e">SimulatorGlobals::getCurrentAbsoluteTime</a></div><div class="ttdeci">double getCurrentAbsoluteTime() const </div><div class="ttdef"><b>Definition:</b> <a href="_simulator_globals_8cpp_source.html#l00070">SimulatorGlobals.cpp:70</a></div></div>
<div class="ttc" id="class_node_html_aec183b66f5f92e8cae4f3a1269e1316c"><div class="ttname"><a href="class_node.html#aec183b66f5f92e8cae4f3a1269e1316c">Node::lastJitter</a></div><div class="ttdeci">double lastJitter</div><div class="ttdoc">Jitter measured between the last two PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00061">Node.h:61</a></div></div>
<div class="ttc" id="class_node_html_a4a5f15b9aed15145bbe65b61a30cdc67"><div class="ttname"><a href="class_node.html#a4a5f15b9aed15145bbe65b61a30cdc67">Node::sumJitter</a></div><div class="ttdeci">double sumJitter</div><div class="ttdoc">Sum of jitters measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00062">Node.h:62</a></div></div>
<div class="ttc" id="class_node_html_a579cc4fb0789a1de48fb56ae99d7385a"><div class="ttname"><a href="class_node.html#a579cc4fb0789a1de48fb56ae99d7385a">Node::sumDelay</a></div><div class="ttdeci">double sumDelay</div><div class="ttdoc">Sum of delays measured for all PDUs received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00059">Node.h:59</a></div></div>
<div class="ttc" id="class_node_html_a14540911910efef23e01ec6ad881b843"><div class="ttname"><a href="class_node.html#a14540911910efef23e01ec6ad881b843">Node::simulatorGlobals</a></div><div class="ttdeci">SimulatorGlobals &amp; simulatorGlobals</div><div class="ttdoc">Reference to SimulatorGlobals object, to get clock time. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00065">Node.h:65</a></div></div>
<div class="ttc" id="class_node_html_a35475c10b6c54bc85c2ce15fb5ea042d"><div class="ttname"><a href="class_node.html#a35475c10b6c54bc85c2ce15fb5ea042d">Node::lastDelay</a></div><div class="ttdeci">double lastDelay</div><div class="ttdoc">Delay measured for last PDU received by this node. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00058">Node.h:58</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae9f5e321e4dfb45e444e007607867737"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1">NodeReturnType</a> Node::updateForwardHops </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt;&#160;</td>
          <td class="paramname"><em>token</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Update token's or PDU's hop fields to prepare it for forwarding, according to explicit route attached to token. </p>
<p>This function calls the token member function to update token's previous and next fields, to prepare it for forwarding. If the next hop in the explicit route is the current node, then understand that the current node might the the source of the token. Then, just ignore and retrieve the next hop from the list of explicit route. This behavior allows the user to construct an explicit route that begins with the source hop. The first forwarding would thus forward the node the node at which it is currently; this function predicts that case and just ignores that next hop, and fetches the one after. However, if this case results from some inconsistenty in the explicit route list, then the outcome here is undefined. If no next hop exists, then this function returns the appropriate NodeReturnType.</p>
<p>This function should work for <a class="el" href="class_token.html" title="Token class. ">Token</a> and <a class="el" href="class_protocol_data_unit.html" title="Protocol Data Unit class. ">ProtocolDataUnit</a> class objects.</p>
<dl class="section return"><dt>Returns</dt><dd>NodeReturnType indicating whether the operation was successful, or not. </dd></dl>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00311">311</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;                                                                 {</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;    <span class="comment">// Sanity check: if next == destination, there is no forwarding to be done! The token has reached its destination.</span></div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;    <span class="keywordflow">if</span> (token-&gt;next.get() == token-&gt;destination.get()) {</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1ab9804cb278b1f322f56a216720a67eec">NodeReturnType::FINAL_DESTINATION</a>;</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;    }</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;    <span class="comment">// Need to check whether next hop is the current hop.</span></div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;    token-&gt;updateHopsFromExplicitRoute(shared_from_this());</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;    <span class="keywordflow">if</span> (<span class="keyword">this</span> == token-&gt;next.get()) { <span class="comment">// Indicates that the route table begins with the source node, or there is some inconsistency...</span></div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;        <a class="code" href="class_node.html#ae9f5e321e4dfb45e444e007607867737">updateForwardHops</a>(token);  <span class="comment">// Recursion. Really? Disaster?</span></div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    }</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1a6491ac1bf9f296c0bd614d1b182f8932">NodeReturnType::PDU_ROUTE_UPDATED</a>;</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;}</div>
<div class="ttc" id="_node_return_type_8h_html_a653f4b3757de7a3613c60211493c60c1a6491ac1bf9f296c0bd614d1b182f8932"><div class="ttname"><a href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1a6491ac1bf9f296c0bd614d1b182f8932">NodeReturnType::PDU_ROUTE_UPDATED</a></div><div class="ttdoc">Node is not final destination; route information was updated within PDU/token, to be forwarded...</div></div>
<div class="ttc" id="_node_return_type_8h_html_a653f4b3757de7a3613c60211493c60c1ab9804cb278b1f322f56a216720a67eec"><div class="ttname"><a href="_node_return_type_8h.html#a653f4b3757de7a3613c60211493c60c1ab9804cb278b1f322f56a216720a67eec">NodeReturnType::FINAL_DESTINATION</a></div><div class="ttdoc">This node is the final destination. Stats updated, nothing else to do in node. </div></div>
<div class="ttc" id="class_node_html_ae9f5e321e4dfb45e444e007607867737"><div class="ttname"><a href="class_node.html#ae9f5e321e4dfb45e444e007607867737">Node::updateForwardHops</a></div><div class="ttdeci">NodeReturnType updateForwardHops(std::shared_ptr&lt; Token &gt; token)</div><div class="ttdoc">Update token&amp;#39;s or PDU&amp;#39;s hop fields to prepare it for forwarding, according to explicit route attached...</div><div class="ttdef"><b>Definition:</b> <a href="_node_8cpp_source.html#l00311">Node.cpp:311</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af7467aafc77bd9d430ca329e931ade5a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Node::updateForwardingStatistics </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt;&#160;</td>
          <td class="paramname"><em>token</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Update <a class="el" href="class_node.html" title="Node class. ">Node</a> statistics upon forwarding of token. </p>
<p>These statistics should only be updated if the token is being forwarded. </p>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00258">258</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;                                                                {</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;    ++<a class="code" href="class_node.html#a0fb081dd5928c91756f9faf672dafb35">forwardedPdusOrTokensCount</a>;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;}</div>
<div class="ttc" id="class_node_html_a0fb081dd5928c91756f9faf672dafb35"><div class="ttname"><a href="class_node.html#a0fb081dd5928c91756f9faf672dafb35">Node::forwardedPdusOrTokensCount</a></div><div class="ttdeci">unsigned int forwardedPdusOrTokensCount</div><div class="ttdoc">Count of forwarded PDUs from this node to next Entity. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00055">Node.h:55</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a2adf03fc3b1465b929d29eb36f574c75"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Node::updateForwardingStatistics </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td>
          <td class="paramname"><em>pdu</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Update <a class="el" href="class_node.html" title="Node class. ">Node</a> statistics upon forwarding of PDU. </p>
<p>These statistics should only be updated if the PDU is being forwarded. </p>

<p>Definition at line <a class="el" href="_node_8cpp_source.html#l00290">290</a> of file <a class="el" href="_node_8cpp_source.html">Node.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;                                                                         {</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    ++<a class="code" href="class_node.html#a0fb081dd5928c91756f9faf672dafb35">forwardedPdusOrTokensCount</a>;</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <a class="code" href="class_node.html#a3423410395300339105d6148290148cc">forwardedBytesCount</a> += pdu-&gt;getPduSize();</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;}</div>
<div class="ttc" id="class_node_html_a3423410395300339105d6148290148cc"><div class="ttname"><a href="class_node.html#a3423410395300339105d6148290148cc">Node::forwardedBytesCount</a></div><div class="ttdeci">unsigned int forwardedBytesCount</div><div class="ttdoc">Count of forwarded bytes from this node to next Entity. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00056">Node.h:56</a></div></div>
<div class="ttc" id="class_node_html_a0fb081dd5928c91756f9faf672dafb35"><div class="ttname"><a href="class_node.html#a0fb081dd5928c91756f9faf672dafb35">Node::forwardedPdusOrTokensCount</a></div><div class="ttdeci">unsigned int forwardedPdusOrTokensCount</div><div class="ttdoc">Count of forwarded PDUs from this node to next Entity. </div><div class="ttdef"><b>Definition:</b> <a href="_node_8h_source.html#l00055">Node.h:55</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a6a54b09eb2ba1cc137ab23a4766c4960"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Node::droppedPdusOrTokensCount</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Count of dropped PDUs by this node. </p>

<p>Definition at line <a class="el" href="_node_8h_source.html#l00057">57</a> of file <a class="el" href="_node_8h_source.html">Node.h</a>.</p>

</div>
</div>
<a class="anchor" id="a3423410395300339105d6148290148cc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Node::forwardedBytesCount</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Count of forwarded bytes from this node to next <a class="el" href="class_entity.html" title="Entity class. ">Entity</a>. </p>

<p>Definition at line <a class="el" href="_node_8h_source.html#l00056">56</a> of file <a class="el" href="_node_8h_source.html">Node.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0fb081dd5928c91756f9faf672dafb35"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Node::forwardedPdusOrTokensCount</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Count of forwarded PDUs from this node to next <a class="el" href="class_entity.html" title="Entity class. ">Entity</a>. </p>

<p>Definition at line <a class="el" href="_node_8h_source.html#l00055">55</a> of file <a class="el" href="_node_8h_source.html">Node.h</a>.</p>

</div>
</div>
<a class="anchor" id="a35475c10b6c54bc85c2ce15fb5ea042d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Node::lastDelay</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Delay measured for last PDU received by this node. </p>

<p>Definition at line <a class="el" href="_node_8h_source.html#l00058">58</a> of file <a class="el" href="_node_8h_source.html">Node.h</a>.</p>

</div>
</div>
<a class="anchor" id="aec183b66f5f92e8cae4f3a1269e1316c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Node::lastJitter</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Jitter measured between the last two PDUs received by this node. </p>

<p>Definition at line <a class="el" href="_node_8h_source.html#l00061">61</a> of file <a class="el" href="_node_8h_source.html">Node.h</a>.</p>

</div>
</div>
<a class="anchor" id="ae133a5c3fc82ca150ff95a0ac0a5da86"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Node::meanDelay</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Mean delay as measured for all PDUs received by this node. </p>

<p>Definition at line <a class="el" href="_node_8h_source.html#l00060">60</a> of file <a class="el" href="_node_8h_source.html">Node.h</a>.</p>

</div>
</div>
<a class="anchor" id="a35637af5cd80cfe72376d43f16b64f19"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Node::meanJitter</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Mean jitter as measured for all PDUs received by this node. </p>

<p>Definition at line <a class="el" href="_node_8h_source.html#l00063">63</a> of file <a class="el" href="_node_8h_source.html">Node.h</a>.</p>

</div>
</div>
<a class="anchor" id="a9e1c05e3d8fbb3e4348418a60e512591"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Node::previousDelay</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Delay measured for previous PDU (the PDU before the current received one) received by this node. Necessary for jitter calculation. </p>

<p>Definition at line <a class="el" href="_node_8h_source.html#l00064">64</a> of file <a class="el" href="_node_8h_source.html">Node.h</a>.</p>

</div>
</div>
<a class="anchor" id="af48f6ec6fd6ea43523f139c5d5ff3cdd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Node::receivedBytesCount</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Count of received bytes by this node. </p>

<p>Definition at line <a class="el" href="_node_8h_source.html#l00053">53</a> of file <a class="el" href="_node_8h_source.html">Node.h</a>.</p>

</div>
</div>
<a class="anchor" id="a15b31ec3be471e9e046f48517e2963aa"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Node::receivedPdusOrTokensCount</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Count of received PDUs by this node (packets for network PDUs, for example). </p>

<p>Definition at line <a class="el" href="_node_8h_source.html#l00054">54</a> of file <a class="el" href="_node_8h_source.html">Node.h</a>.</p>

</div>
</div>
<a class="anchor" id="a14540911910efef23e01ec6ad881b843"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a>&amp; Node::simulatorGlobals</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object, to get clock time. </p>

<p>Definition at line <a class="el" href="_node_8h_source.html#l00065">65</a> of file <a class="el" href="_node_8h_source.html">Node.h</a>.</p>

</div>
</div>
<a class="anchor" id="a579cc4fb0789a1de48fb56ae99d7385a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Node::sumDelay</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sum of delays measured for all PDUs received by this node. </p>

<p>Definition at line <a class="el" href="_node_8h_source.html#l00059">59</a> of file <a class="el" href="_node_8h_source.html">Node.h</a>.</p>

</div>
</div>
<a class="anchor" id="a4a5f15b9aed15145bbe65b61a30cdc67"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Node::sumJitter</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sum of jitters measured for all PDUs received by this node. </p>

<p>Definition at line <a class="el" href="_node_8h_source.html#l00062">62</a> of file <a class="el" href="_node_8h_source.html">Node.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>QcnSim/<a class="el" href="_node_8h_source.html">Node.h</a></li>
<li>QcnSim/<a class="el" href="_node_8cpp_source.html">Node.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Nov 14 2013 11:18:23 for QCNSim by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
